/* GUI CONVERTED from rsschck.p (converter v1.75) Sat Aug 12 23:16:03 2000 */
/* rsschck.p - Release Management Supplier Schedules                    */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*F0PN*/ /*V8:ConvertMode=Maintenance                                   */
/*K1Q4*/ /*V8:WebEnabled=No                                             */
/* REVISION: 7.3    LAST MODIFIED: 04/25/94           BY: WUG *GJ59*    */
/* REVISION: 7.3    LAST MODIFIED: 04/11/95           BY: ame *F0QB*    */
/* REVISION: 7.3    LAST MODIFIED: 06/07/95           BY: dxk *G0PF*    */
/* REVISION: 7.3    LAST MODIFIED: 02/02/96           BY: kjm *G1LT*    */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98           BY: *K1Q4* Alfred Tan */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00           BY: *N0KP* myb        */


      /* CHECK FOR EXISTENCE OF A SCHEDULE IN REMOTE DATABASE */

/*F0QB*/  {mfdeclre.i}
      define input parameter ponbr as character.
      define input parameter podline as integer.
/*G0PF*/  define input parameter scxpart like scx_part no-undo.
/*GOPF*/  define input parameter scxshipto like scx_shipto no-undo.

      define output parameter schedule_found like mfc_logical.
/*G0PF*/  define output parameter somrp_found as logical no-undo.
/*G1LT*/  define output parameter shipper_found as integer no-undo.
/*G1LT*/  define output parameter save_abs like abs_id no-undo.

/*F0QB*   {mfdeclre.i}*/
      define variable old_db as character.
/*F0QB*/  define variable sdb_err as integer no-undo.

/*G1LT*/  find po_mstr where po_nbr = ponbr no-lock.
      find pod_det where pod_nbr = ponbr and pod_line = podline no-lock.
      find si_mstr where si_site = pod_site no-lock.

      if si_db <> global_db then do:
         old_db = global_db.
/*F0QB*      create alias qaddb for database value(si_db).*/
/*F0QB*      global_db = si_db.*/
/*F0QB*/     {gprun.i ""gpalias3.p"" "(input si_db, output sdb_err)"}
/*GUI*/ if global-beam-me-up then undo, leave.


         {gprun.i ""rsschcka.p"" "(input ponbr, input podline,
         output schedule_found)"}
/*GUI*/ if global-beam-me-up then undo, leave.


/*G0PF BEGINS*/
         {gprun.i ""rsschckb.p"" "(input ponbr, input scxpart,
           input scxshipto, output somrp_found)"}
/*GUI*/ if global-beam-me-up then undo, leave.

/*G0PF ENDS*/

/*G1LT*/     {gprun.i ""rsschckc.p"" "(input ponbr, input podline,
           input po_vend, output shipper_found, output save_abs)"}
/*GUI*/ if global-beam-me-up then undo, leave.


/*F0QB*      create alias qaddb for database value(old_db).*/
/*F0QB*      global_db = old_db.*/
/*F0QB*/     {gprun.i ""gpalias3.p"" "(input old_db, output sdb_err)"}
/*GUI*/ if global-beam-me-up then undo, leave.

      end.
      else do:
         {gprun.i ""rsschcka.p"" "(input ponbr, input podline,
         output schedule_found)"}
/*GUI*/ if global-beam-me-up then undo, leave.


/*G0PF BEGINS*/
         {gprun.i ""rsschckb.p"" "(input ponbr, input scxpart,
           input scxshipto, output somrp_found)"}
/*GUI*/ if global-beam-me-up then undo, leave.

/*G0PF ENDS*/

/*G1LT*/     {gprun.i ""rsschckc.p"" "(input ponbr, input podline,
           input po_vend, output shipper_found, output save_abs)"}
/*GUI*/ if global-beam-me-up then undo, leave.


      end.
